package com.aichongbang.acb.mapper;

import com.aichongbang.acb.po.Item;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author acb
 * @since 2021-05-27
 */
@Repository("itemMapper")
public interface ItemMapper extends BaseMapper<Item> {


    @ResultMap("getAllItems")
    List<Item> getAllItems();

    @ResultMap("addItem")
    Integer addItem(Item item);

    @ResultMap("getItemById")
    Item getItemById(@Param("tId") Integer tId);

    @ResultMap("queryItems")
    List<Item> queryItems(Item item);

}
